-
Notifications
You must be signed in to change notification settings - Fork 289
Flake devShell #1549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flake devShell #1549
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I'll read up on flake dev shells before merging.
I think you need to add .direnv
to the .gitignore
, don't you?
Oh, maybe add a |
Ready to merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I'll leave this open for a bit for @o2sh's thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I tested it locally, and it seems to work as expected.
@o2sh we forgot something important. flake.lock pinned nixpkgs, so after a week or less commit get outdated and lock should be refreshed. I have no idea how to work with Workflows yet so i leave this to you. Flake.lock should be updated approximately once in 10 days |
Good point, @Sk7Str1p3. I've reverted the PR for now. On second thought, it might not be ideal to commit these files directly to the repo since they’re tied to a specific setup (Nix). Instead, we could add a section in the Wiki for Nix users, including the |
Could it just be added to the gitignore? We're not like an enterprise team with strict environment requirements, so I think it would be reasonable to just let the dev shell users manage their own lock file. |
Yep, we could left lock out. Also we could set workflows for updating lock. I found few solutions with that already |
https://github.com/DeterminateSystems/update-flake-lock this seems to be best solution as it comes from Nix developers |
In the meantime, I've created a page in the wiki explaining how to setup a local dev environment for onefetch using Nix: https://github.com/o2sh/onefetch/wiki/nix-local-setup Hope that's okay with you @Sk7Str1p3 |
Yep that's okay |
We could probably add .envrc and flake.nix to the .gitignore so nobody accidentally commits them, then |
@o2sh im willing come back with much greater and comprehensive nix toolchain. Crane is library around nix with devShell, automatic tests generator and incremental builds, it also should support cachix which would not even build crates locally but simply download pre-built crates leading to much faster builds. |
I think the Helix editor has a flake devshell configured, so we could probably just do what they do |
Helix flake not using all Nix features, I feel like they added it just 'for the sake of it'. |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [o2sh/onefetch](https://github.com/o2sh/onefetch) | minor | `2.23.1` -> `2.24.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>o2sh/onefetch (o2sh/onefetch)</summary> ### [`v2.24.0`](https://github.com/o2sh/onefetch/blob/HEAD/CHANGELOG.md#2240-2025-04-12) [Compare Source](o2sh/onefetch@2.23.1...2.24.0) ##### New Features - add language support for Lean by [@​foxyseta](https://github.com/foxyseta) in o2sh/onefetch#1509 - add language support for Typst by [@​foxyseta](https://github.com/foxyseta) in o2sh/onefetch#1508 - add language support for Razor by [@​SrS2225a](https://github.com/SrS2225a) in o2sh/onefetch#1521 ##### Chores - more idiomatic way to fetch HEAD refs by [@​o2sh](https://github.com/o2sh) in o2sh/onefetch#1515 - more idiomatic way to fetch repository remote URL by [@​o2sh](https://github.com/o2sh) in o2sh/onefetch#1516 - update holyc language logo by [@​o2sh](https://github.com/o2sh) in o2sh/onefetch#1543 - update wiki powershell-snippet by [@​FallenDeity](https://github.com/FallenDeity) in o2sh/onefetch#1542 - add nix local setup [@​Sk7Str1p3](https://github.com/Sk7Str1p3) in o2sh/onefetch#1549 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC4xMS4yIiwidXBkYXRlZEluVmVyIjoiNDAuMTEuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
little flake for development shell with nix